﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using PreguntaAlExperto.RulesLayer.Entities;
using PreguntaAlExperto.RulesLayer.Services;

namespace PreguntaAlExperto
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.lblNewArticles.Text = Resources.language.NewArticlesHeader;
            this.lblTop10Views.Text = Resources.language.Top10Views;
            this.lblTop10Votes.Text = Resources.language.Top10Votes;

            ArticlesService _service = new ArticlesService();
            this.dataListNewArticles.DataSource = _service.getNewArticles();
            this.dataListNewArticles.DataBind();

            this.dataListTopTenVisits.DataSource = _service.getTopTeenVisited();
            this.dataListTopTenVisits.DataBind();

            this.dataListTopTenVoted.DataSource = _service.getTopTeenVoted();
            this.dataListTopTenVoted.DataBind();
        }
    }
}
